using System;
using System.Collections.Generic;
using System.Text;
using Castle.DynamicProxy;

using Castle.Windsor;
using Castle.Windsor.Configuration.Interpreters;
using Castle.Core.Resource;

using SmartRename.Interfaces;
using Castle.Core.Interceptor;

namespace SmartRename.Containers
{
    public static class Container
    {

        private static IWindsorContainer windsor;
        private static IWindsorContainer Windsor
        {
            get
            {
                if (windsor == null)
                {
                    windsor = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle")));
                }
                return windsor;
            }
        }

        public static T GetService<T>()
        {
            T t = Windsor.GetService<T>();
            return t;
        }
    }
}
